///<reference path="../GithubExample/singleton.ts"/>
///<reference path="../DesignPattern/abstract-factory.ts"/>
import { AbstractFactoryAction } from "../DesignPattern/abstract-factory";
import { TestAdater } from "../DesignPattern/adapter";
import { BridgeAction } from "../DesignPattern/bridge";
import { BuilderAction } from "../DesignPattern/builder";
import { ChainOfResponsebilityAction } from "../DesignPattern/chain-of-responsebility";
import { CommandAction } from "../DesignPattern/command";
import { CompositeAction } from "../DesignPattern/composite";
import { DecoratorAction } from "../DesignPattern/decorator";
import { FacadeAction } from "../DesignPattern/facade";
//import { FXCMData } from "../FMCode/FXCMData";
import { FactoryMethodAction } from "../DesignPattern/factory-method";
import {RedisAction} from "../FMCode/RedisTest";
import {TonghuashunService} from "../Stock/jqka";
import {ThriftServer} from "../Service/ThriftService"
namespace justTest {
  export class StartUp {
    public Main(): number {
      //this.testAbstractFactory();
      // this.testAdapter();
      //  this.testBridge();
      // this.testBuilder();
      // this.testChainOfResponsebility();
      // this.testCommand();
      // this.testComposite();
      //this.testDecroator();
      // this.testFacade();
  new ThriftServer().test();
      //  this.fxcmData();
     // this.testFactoryMethod();
     new RedisAction().test();
 //    new TonghuashunService().getCommentByStockID(300408);
      // var sss = SingletonPattern.Singleton.Instance;
      // var oneSingleton = SingletonPattern.Singleton.Instance;
      // var twoSingleton = SingletonPattern.Singleton.Instance;
      // if(oneSingleton == twoSingleton)
      // {
      //   console.log("typescript singleton pattern is eval");
      // }
      // else
      // {
      //   console.log("typescript singleton pattern is not a value");
      // }
      // console.log("xinbaby");
      return 0;
    }
    private testAbstractFactory(): void {

      new AbstractFactoryAction().test();
    }
    private testAdapter(): void {
      new TestAdater().test();
    }
    private testBridge(): void {
      new BridgeAction().test();
    }
    private testBuilder(): void {
      new BuilderAction().test();
    }
    private testChainOfResponsebility(): void {
      new ChainOfResponsebilityAction().test();
    }

    private testCommand(): void {
      new CommandAction().test();
    }

    private testComposite(): void {
      new CompositeAction().test();
    }
    private testDecroator(): void {
      new DecoratorAction().test();
    }
    private testFacade(): void {
      new FacadeAction().test();
    }

    private fxcmData(): void {
      new FXCMData().getFXCMQuote();
    }
    private testFactoryMethod(): void {
      new FactoryMethodAction().test();
    }

  }




  new StartUp().Main();
}